; *** Blobs
; *** Copyright 1998-2002 Zillions Development
; v.2.0

; You need to purchase Zillions of Games to load this rules file
; Visit the Zillions web site at http://www.zillions-of-games.com
(translate
 ("Red""红方")("Blue""蓝方")("Blob""球")
 ("Blobs""同化棋(Blobs)")
 ("Web""密室")("Plus""十字")("Checkered""单色格")("Mixers""混战")("Walls""分隔墙")("Doors""缺口")("More Doors""四个缺口")
)
(version "2.0")

(define flip-adjacent
    (if (and (enemy? $1) (not-piece? Block $1))
        (change-owner $1)
    )
)
(define flip-all
    (flip-adjacent n)
    (flip-adjacent ne)
    (flip-adjacent e)
    (flip-adjacent se)
    (flip-adjacent s)
    (flip-adjacent sw)
    (flip-adjacent w)
    (flip-adjacent nw)
)
(define leap2  ($1 $2 (verify empty?) (flip-all) add) )
(define divide ($1 (verify empty?) (flip-all) add-copy) )

(game
   (title "Blobs")
   (description "吃掉对方所有棋子获胜。\你可以：\
①将自己的棋子落在周围8格有自己棋子的空格；\
②将盘上的一个棋子跳到距离其原位置2格的空格。\
棋子下落之后，任何棋子周围的对方棋子都会变成你的棋子。\
本玩法提供了多个布局。")
   (history "This computer game began on the Amiga as a game called `Infection`.  It
   was later programmed by Graeme Devine on various videogame and computer systems
   as `Spot`, using the animated 7Up character licensed by Virgin Games, and later
   appeared in Devine's popular `7th Guest` and `11th Hour` games.   It later appeared
   as an arcade game by Leland under the name Ataxx.   It has been programmed under many
   other names as well, and even in hexagonal form as Hexxagon.")
   (option "pass turn" forced)
   (option "animate drops" false)
   (option "prevent flipping" 2)
   (strategy "Try not to leave any holes in your positions, since they can be easily
      occupied, capturing many pieces.   Jump moves are especially vulnerable to
      leaving dangerous holes.   Early in the game, make drop moves and try to move
      towards the center.")
   (win-sound "Audio\\Splotch.wav")
   (loss-sound "Audio\\Splotch.wav")
   (drop-sound "Audio\\ResBlub.wav")
   (move-sound "Audio\\Reverse.wav");
   (change-sound "Audio\\Splat.wav")
   (click-sound "Audio\\ResBlub.wav")
   (players Red Blue None)
   (turn-order Red Blue)
   (board
      (image "images\Blobs\blobbd.bmp")
      (grid
         (start-rectangle 3 3 33 33)
         (dimensions
             ("a/b/c/d/e/f/g" (32 0)) ; files
             ("7/6/5/4/3/2/1" (0 32)) ; ranks
         )
         (directions (n 0 -1)(ne 1 -1)(e 1 0)(se 1 1)(s 0 1)(sw -1 1)(w -1 0)(nw -1 -1))
      )
   )
   (board-setup
      (Red  (Blob a7 g1) )
      (Blue (Blob a1 g7) )
   )
   (piece
      (name Blob)
      (image Red  "images\Blobs\BlobRed.bmp" "images\Blobs\BlobRed2.bmp"
             Blue "images\Blobs\BlobBl.bmp"  "images\Blobs\BlobBl2.bmp")
      (help "球：分裂到相邻格，或跳到两格远的格子")
      (moves
         (leap2 n n)(leap2 ne n)(leap2 ne ne)(leap2 ne e)
         (leap2 e e)(leap2 se e)(leap2 se se)(leap2 se s)
         (leap2 s s)(leap2 sw s)(leap2 sw sw)(leap2 sw w)
         (leap2 w w)(leap2 nw w)(leap2 nw nw)(leap2 nw n)
         (divide n)(divide ne)(divide e)(divide se)
         (divide s)(divide sw)(divide w)(divide nw)
      )
   )
   (piece
       (name Block)
	   (image None "images\Blobs\brick.bmp")
   )
   (count-condition (total-piece-count 49) )
   (loss-condition (Red Blue) (pieces-remaining 0) )
)

(variant
   (title "-") ; ********* Other Starting Positions *********
)

(variant
   (title "Web")
   (board-setup
      (Red   (Blob a7 g1) )
      (Blue (Blob a1 g7) )
	  (None  (Block a2 a6 b1 b2 b6 b7 c3 c5 d4 e3 e5 f1 f2 f6 f7 g2 g6) )
   )  
)

(variant
   (title "Plus")
   (board-setup
      (Red   (Blob a7 g1) )
      (Blue (Blob a1 g7) )
	  (None  (Block a4 b4 c4 d4 e4 f4 g4 d1 d2 d3 d5 d6 d7) )
   )  
)

(variant
   (title "Checkered")
   (board-setup
      (Red   (Blob a7 g1) )
      (Blue (Blob a1 g7) )
	  (None  (Block a2 a4 a6 b1 b3 b5 b7 c2 c4 c6 d1 d3 d5 d7 e2 e4 e6 f1 f3 f5 f7 g2 g4 g6) )
   )  
)

(variant
   (title "Mixers")
   (board-setup
      (Red   (Blob a7 g1 a2 b1 f7 g6) )
      (Blue (Blob a1 g7 a6 b7 f1 g2) )
	  (None  (Block a3 a5 b2 b6 c1 c7 e1 e7 f2 f6 g3 g5) )
   )  
)

(variant
   (title "Walls")
   (board-setup
      (Red   (Blob a7 g1) )
      (Blue (Blob a1 g7) )
	  (None  (Block a3 b3 c3 d3 e3 f3 g3 a5 b5 c5 d5 e5 f5 g5) )
   )  
)

(variant
   (title "Doors")
   (board-setup
      (Red   (Blob a7 g1) )
      (Blue (Blob a1 g7) )
	  (None  (Block a3 b3 d3 f3 g3 a5 b5 d5 f5 g5) )
   )
)

(variant
   (title "More Doors")
   (board-setup
      (Red   (Blob a7 g1) )
      (Blue (Blob a1 g7) )
	  (None  (Block a3 c3 e3 g3 a5 c5 e5 g5) )
   )
)

